using logging;

interface Engine{
    void run();
}

class BenzEngine: Engine{
    public void run(){
        Log.print("奔驰：舒适而稳定");
    }
}

class BWM_Engine: Engine{
    public void run(){
        Log.print("宝马：完美的操控体验");
    }
}

class HummerEngine: Engine{
    public void run(){
        Log.print("悍马：超强的越野性能");
    }
}

class Car{
    private Engine _engine;
    public Car(Engine engine){
        this.conditioning(engine);
    }

    public void conditioning(Engine engine){
        this._engine = engine;
        this._engine.run();  // 试试车呗
    }
}

class TuningHouse{
    static void Main(){
        #if FACTORY
            var car_benz = new Car(new BenzEngine());
            var car_BWM = new Car(new BWM_Engine());
        #else  // conditioning
            var car = new Car(new BenzEngine());
            car.conditioning(new BWM_Engine());
            car.conditioning(new HummerEngine());
        #endif
    }
}